package com.dog.auth.service;

import com.dog.auth.domain.dto.request.LoginReqDTO;
import com.dog.auth.domain.dto.request.RegisterReqDTO;
import com.dog.auth.domain.vo.AuthUserVO;
import com.dog.framework.core.model.ResponseResult;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.Map;

/**
 * @author liuxk
 * @date 2023/12/19 17:07
 *
 */
public interface AuthService {



    /**
     * 创建image
     * @return
     */
     Map<String, Object> createCaptcha() throws IOException;

    /**
     * 登录
     * @param user
     * @return
     */
    AuthUserVO login(@RequestBody LoginReqDTO user);

    /**
     * 注册
     * @param dto
     * @return
     */
    boolean register(@RequestBody RegisterReqDTO dto);

    /**
     * 登出
     * @param
     * @return
     */
    boolean logout();

    /**
     * 刷新token
     * @param request
     * @return
     */
    ResponseResult refresh(HttpServletRequest request);

}
